package com.ruoyi.shop.api;
import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.shop.api.domain.CheShopImage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;

@FeignClient(contextId = "remoteShopImageService", value = ServiceNameConstants.SHOP_SERVICE)

public interface RemoteShopImageService {

    @GetMapping("/image/list")
    public TableDataInfo list(CheShopImage cheShopImage, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);


    /**
     * 导出门店照片列表
     */

    @PostMapping("/image/export")
    public void export(HttpServletResponse response, CheShopImage cheShopImage,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);


    /**
     * 获取门店照片详细信息
     */

    @GetMapping(value = "/image/{shopImageId}")
    public AjaxResult getInfo(@PathVariable("shopImageId") Long shopImageId,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);


    /**
     * 新增门店照片
     */

    @PostMapping("/image")
    public AjaxResult add(@RequestBody CheShopImage cheShopImage,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);


    /**
     * 修改门店照片
     */

    @PutMapping("/image")
    public AjaxResult edit(@RequestBody CheShopImage cheShopImage,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);


    /**
     * 删除门店照片
     */

    @DeleteMapping("/image/{shopImageIds}")
    public AjaxResult remove(@PathVariable Long[] shopImageIds,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
